package com.jkwzms.jk.jkzb.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.springframework.format.annotation.DateTimeFormat;

import com.jkwzms.common.entity.BaseOracleEntity;
import com.jkwzms.common.repository.support.annotation.EnableQueryCache;

@Entity
@Table(name = "nbjs_jk_jkzb")
@EnableQueryCache
@SequenceGenerator(name = "seq", allocationSize = 1, sequenceName = "jkwzms_jkzb_seq")
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class JkzbModel extends BaseOracleEntity<Long> implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    //项目单位
    @Column(name = "project_unit")
    private String            projectUnit;
    
    //井号
    @Column(name = "well_number")
    private String            wellNumber;
    
    //设备类型
    @Column(name = "unit_type")
    private String            unitType;
    
    //办理日期
    @Temporal(TemporalType.DATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "bl_date")
    private Date              blDate;
    
    //要求到井日期
    @Temporal(TemporalType.DATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "dj_date")
    private Date              djDate;
    
    //发井日期.
    @Temporal(TemporalType.DATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "fj_date")
    private Date              fjDate;
    
    //承办人员
    @Column(name = "cb_people")
    private String            cbPeople;
    
    //联系方式
    @Column(name = "telephone")
    private String            telephone;
    
    //生产管理
    @Column(name = "scgl")
    private String            scgl;
    
    //物资管理
    @Column(name = "wzgl")
    private String            wzgl;
    
    //状态
    @Column(name = "zt")
    private String            zt;
    
    //回收时间
    @Temporal(TemporalType.DATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "hs_date")
    private Date              hsDate;
    
    //备注
    @Column(name = "remark")
    private String            remark;
    
    //相对应的上传文件地址
    @ManyToOne(fetch = FetchType.EAGER , cascade = {CascadeType.REFRESH })
    @JoinColumn(name = "address", nullable = false)
    @NotFound(action = NotFoundAction.IGNORE)
    private JkUploadModel            address;
    
    //本期结算时间
    @Temporal(TemporalType.DATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "bqjs_date")
    private Date              bqjsDate;
    
    //单价
    @Column(name = "dj")
    private String              dj;


    public String getProjectUnit() {
        return projectUnit;
    }

    public void setProjectUnit(String projectUnit) {
        this.projectUnit = projectUnit;
    }

    public String getWellNumber() {
        return wellNumber;
    }

    public void setWellNumber(String wellNumber) {
        this.wellNumber = wellNumber;
    }

    public String getUnitType() {
        return unitType;
    }

    public void setUnitType(String unitType) {
        this.unitType = unitType;
    }

    public Date getBlDate() {
        return blDate;
    }

    public void setBlDate(Date blDate) {
        this.blDate = blDate;
    }

    public Date getDjDate() {
        return djDate;
    }

    public void setDjDate(Date djDate) {
        this.djDate = djDate;
    }

    public Date getFjDate() {
        return fjDate;
    }

    public void setFjDate(Date fjDate) {
        this.fjDate = fjDate;
    }

    public String getCbPeople() {
        return cbPeople;
    }

    public void setCbPeople(String cbPeople) {
        this.cbPeople = cbPeople;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getScgl() {
        return scgl;
    }

    public void setScgl(String scgl) {
        this.scgl = scgl;
    }

    public String getWzgl() {
        return wzgl;
    }

    public void setWzgl(String wzgl) {
        this.wzgl = wzgl;
    }

    public String getZt() {
        return zt;
    }

    public void setZt(String zt) {
        this.zt = zt;
    }

    public Date getHsDate() {
        return hsDate;
    }

    public void setHsDate(Date hsDate) {
        this.hsDate = hsDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    
    public JkUploadModel getAddress() {
        return address;
    }

    
    public void setAddress(JkUploadModel address) {
        this.address = address;
    }

    public Date getBqjsDate() {
        return bqjsDate;
    }

    public void setBqjsDate(Date bqjsDate) {
        this.bqjsDate = bqjsDate;
    }

    
    public String getDj() {
        return dj;
    }

    
    public void setDj(String dj) {
        this.dj = dj;
    }

}
